home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig10_01.jar
/
Ch10
/
Fig10_01
/
Employ2.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-10-28
|
564b
|
25 lines
// Fig. 10.1: employ2.h
// Abstract base class Employee
#ifndef EMPLOY2_H
#define EMPLOY2_H
#include <iostream.h>
class Employee {
public:
Employee( const char *, const char * );
~Employee(); // destructor reclaims memory
const char *getFirstName() const;
const char *getLastName() const;
// Pure virtual function makes Employee abstract base class
virtual double earnings() const = 0; // pure virtual
virtual void print() const; // virtual
private:
char *firstName;
char *lastName;
};
#endif